' Scales
' This program demonstrates the SOUND statement.

CLS

INPUT "Please enter an octave value (1-5):  ", octave%

' Play one octave.

FOR i% = 1 TO 8
    READ note%                                   ' read frequency of note
    note% = note% * (2 ^ octave%)        ' raise note to desired octave
    SOUND note%, 6                             ' play note
NEXT i%

' Frequencies of the notes of the C major scale in the first octave.

DATA 32.70,36.70,41.20,43.65,49.00,55.00,61.74,65.41
